//
//  ZYColorMacro.h
//  YiLin
//
//  Created by Zyark on 2018/5/27.
//  Copyright © 2018年 Zyark. All rights reserved.
//

#ifndef ZYColorMacro_h
#define ZYColorMacro_h

// ====================================取色值相关的方法==========================================

#define RGB(r,g,b)          [UIColor colorWithRed:(r)/255.f \
green:(g)/255.f \
blue:(b)/255.f \
alpha:1.f]

#define RGBA(r,g,b,a)       [UIColor colorWithRed:(r)/255.f \
green:(g)/255.f \
blue:(b)/255.f \
alpha:(a)]

#define RGBOF(rgbValue)     [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 \
alpha:1.0]

#define RGBA_OF(rgbValue)   [UIColor colorWithRed:((float)(((rgbValue) & 0xFF000000) >> 24))/255.0 \
green:((float)(((rgbValue) & 0x00FF0000) >> 16))/255.0 \
blue:((float)(rgbValue & 0x0000FF00) >> 8)/255.0 \
alpha:((float)(rgbValue & 0x000000FF))/255.0]

#define RGBAOF(v, a)        [UIColor colorWithRed:((float)(((v) & 0xFF0000) >> 16))/255.0 \
green:((float)(((v) & 0x00FF00) >> 8))/255.0 \
blue:((float)(v & 0x0000FF))/255.0 \
alpha:a]
#define kColorWithStr(colorStr)      [UIColor colorWithHexString:colorStr]


// =====================================通用颜色=========================================

#define kBlackColor         [UIColor blackColor]
#define kDarkGrayColor      [UIColor darkGrayColor]
#define kLightGrayColor     [UIColor lightGrayColor]
#define kWhiteColor         [UIColor whiteColor]
#define kGrayColor          [UIColor grayColor]
#define kRedColor           [UIColor redColor]
#define kGreenColor         [UIColor greenColor]
#define kBlueColor          [UIColor blueColor]
#define kCyanColor          [UIColor cyanColor]
#define kYellowColor        [UIColor yellowColor]
#define kMagentaColor       [UIColor magentaColor]
#define kOrangeColor        [UIColor orangeColor]
#define kPurpleColor        [UIColor purpleColor]
#define kClearColor         [UIColor clearColor]
#define kRandomFlatColor    [UIColor randomFlatColor]

#if APPTYPE == 1 //亿林 //新的
#define kMainColorStartColorHexString @"19D892"
#define kMainColorEndColorHexString @"00CEB3"
#define kMainColor RGBA(25, 216, 146, 1)
#define kCircleSliderColor RGBA(255, 121, 89, 1)
#define kDeviceLabelColor RGBA(255, 255, 255, 1)
#define kPmBGColor RGBA(255, 255, 255, 0.2)
#else
#define kMainColorStartColorHexString @"41B9E6"
#define kMainColorEndColorHexString @"1183D9"
#define kMainColor RGBA(17, 131, 217, 1)
#define kCircleSliderColor RGBA(17, 131, 217, 1)
#define kDeviceLabelColor RGBA(102, 102, 102, 1)
#define kPmBGColor RGBA(17, 131, 217, 0.1)
#endif

#define kBtnTitleColor RGBA(153, 153, 153, 1)

//#define kMainColor RGBA(17, 131, 217, 1)
#define kLabelColor RGBA(51, 51, 51, 1)

#endif /* ZYColorMacro_h */
